package com.foreknow.example7;

public class UseCompute {
    public void useCom(Compute com, int one, int two) {
        int num = com.computer(one,two);
        System.out.println(num);
    }

    public static void main(String[] args) {
        UseCompute useCompute = new UseCompute();
        //        Compute jia = new Jia();
        //        Compute jian = new Jian();
        Compute cheng = new Cheng();
        Compute chu = new Chu();

        useCompute.useCom(new Jia(),5,3);
        useCompute.useCom(new Jian(),5,3);
    }
}
